Fixed image resize issues