Fixing syntax error and wrong subent