Adding better error for strange bug