Fixes for some issues from YouTrack