Fixed timer deadlock. Fixed #17