Fixed error checking in status parsing functions