Fixed black pixels and added better error handling