unbind events properly with rendering

fixes #30