fixing image resize issues