code fixes ( Thanks R. Yonaba )