Fix funtionality