Added proper exit status to dict function.