Bugfixes to jQuery manipulation & permissions checks