fixed lots of isssues