Fixed bug in slide movement