Block bugfixes

this is dependent on https://github.com/wysiwhat/Aloha-Editor/pull/37 and includes all the changes from that pull request, please review and merge that one first for easier reading