fixed bug in lamp initialization