Handling edge-case exception