SQL injection fix, Credit to MrStonedOne