Correcting the code place from method to static block