Bugfix: wrong number of raft layers in some situations due to a numerical error