severall bug fixes