fixed issues with lightning