Minor Bug Fixes

Minor changes to customer.php, improved error handling.