not sure your ioc solution will work
the ioc interrupt flag pir0.4 is not being cleared . you only clear the ioc pin flag, its not enough.