bugfixes

fixes some things about next and previous, and fixes some command system
problems.
fixes next button on webpage