Added ability to handle incorrect argument errors