fixing bugs from else productions