fix #34 (not all calls are safe, but the most important ones)