Fixes in case magic_quotes is turned on