compile bugs fixed