Bug conditions fixed