"fixed" error handling in a bad way