some small fixes, more security