quick fixes for memory issue