Delete query failed due to unformatted key