added undefined check in serializer to fix issue #38
updated dist