fixed bug with slider not setting duration right in some situations