Fix behavior with hash with nothing after it