Fixes bug on bad syntax for encoding