Bugfixing

@taviscaron please check