fixes, error handling