fixed end code reference