Added onerror listener