Fix last track behavior
Add some asserts, disable in release mode