Fixed all kinds of issues