Fixed regression. Removed redundant variable. Also fixes #14