removal of $end error