now actually fixes sql exception