Debug done - few fixes