updated a few bugs