more bugs fixes