Bugfix - calling entry/exit procedure