If baked in close quarters; small / deep dish time will need to be longer than if in a shallower dish...... but in any case 40 minutes is pretty short.
check out this link... http://bit.ly/I70DmW
400* at hour should work if its with a bone. Smoking on a smoker at 215*F takes about 2 hours.
I usually grill/smoke them. Inside I broil boneless thighs for about 10 min each side. For intact thighs it is about 45 minutes baked at 400F. Obviously depends on size, temp of chicken going in the oven and accuracy of your ovens thermostat.
usually, my mommy tells me to bake it at 350 F for an hour and 30mins.