ending problems fixed