Fixed MySQL strict_mode issues