added a limit to the resizableness