Added a cpuple of fixes