fixed chrashing