Fix some initial bugs