fix bug on picture resizer