Fixed corner calculation and allow to horizontal scroll to be desapear if not needed.