Using layoutView instead of parentView in convertFrame*
Added some more null checks