# Bone constraints not applied correctly

I have a cube which is not rotated. And I have a bone that I want to add a copy rotation constraints where the target will be the cube. The problem is that when I add this constraint the bone is rotated in a wrong direction, as normally it should point to the x-direction but when I I make the copy rotation it points to the y-direction. If anyone could please advise why this is happening. I added screenshots below.

Before copy rotation

Cube properties showing there is no rotation

after copy rotation

copy rotation constraint

Edit:

After applying rotation -90 in x-direction the axis was good in edit mode, but once switching to pose mode the axis is wrong

After applying -90 in x-direction in edit mode:

After applying -90 in x-direction in pose mode:

And this is after adding the copy rotation constraint: