fixed issues introduced by previous commit