Fixed major (possible) bug