Corrected theta correction's bug