Fixed bug in application