Magic quotes fixes