Prevent segv from bad key