Added better handling in status api call.