fixed crash for now

will look more into it.