Fix for #270, serializer options were being ignored

Made small code change and added appropriate test.