fixed heap overflow