Bugless fix (see commits)