Some changes after the advice of wpoely86