Improved escape runtime function. Fixed #59