Error in inserting stats