Random bases fix