better timer handling
fix error handling