Fixed nasty serializer bugs

Also, build is now working again.