Simple bug fixes. Syntax errors etc