got rid of errors in certain loss case