Fix several bugs

Also, I will use this account for pushing for most commits