A few fixes for issue