added check to disable pop from stack if the id is a function