Some fixes for Bugsense reported bugs