Improved error handling and fixed mobile_access hack