Fixed some issuesi