Improved restart functionality