Fixed all remaining bugs I think