fix potantial crash