Fix handler and add missing tests (re #91)
Convert the correct type for key ID, string, oops