Fixing resize issues