Bugfix with resize