fixed a crash, added improvements