Added lost previous bugfixes