Fixed some minor Bugs