fixes an issue when no scrollbar is shown