Set bounds correctly, add tests