some resize fixes, need to refactor