Fixed miscallaneous issues