Few fixes to previous commit working.