better error handling
fixes for attributes