fixed some timings
fixed crash
bug fixes