fixed bug where variable types and names weren't taken into account