Fixed bug issues