--Tweaks and bugfixes to percent_complete