few fixes for skeleton algorithm