Fixed serializer and test bugs