adding bugfix to elevator's run method