Bugfix in engine lib