Fixed some general issues