Fixed a bug with the serializer where it would crash based on how the QT libraries were built. Also fixed warnings about sign mismatch