fixes null bug in chrome