Fixes for issues 2