Added finish statements and updated build to 5.1