Added a few fixes after testing