fixed functional issues