resolution of several bugs