Added additional check in __convert_L_G. Fixed an minor bug in selftesting.