Fixed issue with code being released too soon