Added a bugfix for the resize bug.